package st.yushao.restaurant.action.custom;

import st.yushao.restaurant.common.SystemContext;
import st.yushao.restaurant.dao.CustomDaoService;
import st.yushao.restaurant.fw.AbstractBaseAction;
import st.yushao.restaurant.vo.CustomVO;

public class AnonymousOrderInit extends AbstractBaseAction {

    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = 2141425798249113546L;

    /**
     * custom service
     */
    private CustomDaoService cds;

    private int custumId;
    /**
     * @return the cds
     */
    public CustomDaoService getCds() {
        return cds;
    }

    /**
     * @param cds the cds to set
     */
    public void setCds(CustomDaoService cds) {
        this.cds = cds;
    }

    public String doExecute() {
        CustomVO vo = new CustomVO();
        vo.setRestId(SystemContext.getSaVO().getRestId());
        this.custumId = (Integer) cds.addCustomInfo(vo);
        return SUCCESS;
    }

    /**
     * @return the custumId
     */
    public int getCustumId() {
        return custumId;
    }

}
